package com.lyj.mode.combination;

import java.util.ArrayList;
import java.util.List;

/**
 * 运动装
 * @author:liyajie
 * @createTime:2022/2/28 16:21
 * @version:1.0
 */
public class Sportswear extends Component{

    List<Component> componentList = new ArrayList<Component>();

    @Override
    public String getName() {
        return super.getName();
    }

    @Override
    public String getDesc() {
        return super.getDesc();
    }

    public Sportswear(String name, String desc) {
        super(name, desc);
    }

    @Override
    public void add(Component component) {
        componentList.add(component);
    }

    @Override
    public void remove(Component component) {
        componentList.remove(component);
    }

    @Override
    public void show() {
        for (Component component: componentList) {
            System.out.println(component.getName());
        }
    }
}
